home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 July
/
Chip_2004-07_cd1.bin
/
opsys
/
wmakeup
/
downloads
/
ClassixCBO.wmz
/
Classix DSB.js
< prev
next >
Wrap
Text File
|
2004-05-07
|
5KB
|
307 lines
var tmpWidth = 0;
var tmpHeight = 0;
function OnLoad()
{
tmpWidth = parseInt(theme.loadPreference("tmpWidth"));
tmpHeight = parseInt(theme.loadPreference("tmpHeight"));
view.width = tmpWidth;
view.height = tmpHeight;
//extratext.value="here";
PLResize();
UpdateMetadata();
OnRefresh();
}
function UpdateMetadata()
{
var txt1;
var txt2;
var txt3;
if (player.openState == 13)
{
if (player.currentMedia.ImageSourceWidth == 0)
{
txt1 =player.currentmedia.name;
titletext.value = txt1;
txt2 = player.currentmedia.getiteminfo("bitrate");
txt3 = player.currentmedia.getiteminfo("author");
artisttext.value = txt3;
bittext.value = txt2 /1000 + " Kb/s";
}
else
{
txt1 = player.currentmedia.name;
titletext.value = txt1;
txt2 = player.currentmedia.getiteminfo("FileType");
txt3 = "Video File";
artisttext.value = txt3;
bittext.value = txt2+" format";
OnRefresh();
}
}
}
function PLResize()
{
playlist.setColumnResizeMode( 0, "stretches" );
playlist.setColumnResizeMode( 1, "Autosizedata" );
}
function OnRefresh()
{
if (player.playState==1)
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
else
if (player.playstate==8)
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
else
{
if (player.currentMedia.ImageSourceWidth == 0)
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
else
{
vidvoid.visible=true;
video.visible=true;
playlist.visible=false;
}
}
}
function OnPlay()
{
player.controls.play();
if (player.currentMedia.ImageSourceWidth == 0)
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
else
{
playlist.visible=false;
video.visible=true;
vidvoid.visible=true;
}
}
function OnStop()
{
player.controls.stop();
if (player.currentMedia.ImageSourceWidth == 0)
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
else
{
video.visible=false;
vidvoid.visible=false;
playlist.visible=true;
}
}
function OnClose()
{
theme.savePreference("tmpWidth",view.width);
theme.savePreference("tmpHeight",view.height);
theme.savePreference( 'extraControls', 'false' );
}
function Resize()
{
mediacenter.videoStretchToFit=true;
view.size('bottomright');
}
/// EXTRA CONTROLS ///
function toggleExtraControls()
{
var ecOn;
ecOn = theme.loadPreference('extraControls');
if (ecOn!='true') {
theme.savePreference( 'extraControls', 'true' ); theme.openViewRelative('extraControls',large.width,0);
}
else {
theme.savePreference( 'extraControls', 'false' ); theme.closeView('extraControls');
}
}
function EQSelectMenu()
{
var index = 0;
var max = eq.presetCount;
presetSelect.deleteAll();
presetSelect.fontFace="Tahoma";
presetSelect.fontSize=8;
for (index=0; index<max; index++)
{
presetSelect.AppendItem( eq.presetTitle(index) );
}
presetSelect.selectedItem = eq.currentPreset;
presetSelect.show();
}
function EQMode()
{
eq1.enabled = !eq.bypass;
eq2.enabled = !eq.bypass;
eq3.enabled = !eq.bypass;
eq4.enabled = !eq.bypass;
eq5.enabled = !eq.bypass;
eq6.enabled = !eq.bypass;
eq7.enabled = !eq.bypass;
eq8.enabled = !eq.bypass;
eq9.enabled = !eq.bypass;
eq10.enabled = !eq.bypass;
}
/*function controlSelectMenu()
{
controlSelect.deleteAll();
controlSelect.fontFace="Tahoma";
controlSelect.fontSize=8;
controlSelect.AppendItem( "Equalizer" );
controlSelect.AppendItem( "SRS Effects" );
controlSelect.show();
}
function controlDisplay()
{
var sel=controlSelect.selectedItem;
if(sel==0)
{
srsVw.visible=false;
eqVw.visible=true;
}
if(sel==1)
{
eqVw.visible=false;
srsVw.visible=true;
speakertext.visible=true;
}
}*/
function controlSwitch()
{
if(srsVw.visible==true)
{
srsVw.visible=false;
eqVw.visible=true;
}
else
if(eqVw.visible==true)
{
eqVw.visible=false;
srsVw.visible=true;
speakertext.visible=true;
}
}
function spkSel()
{
var size=eq.speakerSize;
if(size==2)
{
eq.speakerSize=0;
}
else
{
eq.speakerSize++;
}
speakertext.value="ò "+eq.currentSpeakerName;
}